﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Manager_download_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>资料下载</title>
    <link href="../../Style/css/fontCss.css" rel="stylesheet" type="text/css" />
</head>
<body>
   <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server" />
    <ext:Panel ID="Panel1" runat="server" BodyPadding="5px" EnableLargeHeader="false"
        EnableBackgroundColor="true" ShowBorder="true" ShowHeader="true" Layout="Container"
        BoxConfigAlign="Top" AutoHeight="true" Title="资料下载">
        <Items>
        <ext:Form ID="Form2" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
                ShowBorder="false" EnableBackgroundColor="true">
                <Rows>
                    <ext:FormRow ID="FormRow1" runat="server">
                        <Items>
                            <ext:TextBox ID="txtkeyword" MaxLength="20" EmptyText="关键字" runat="server" Label="资料名称" Text="">
                            </ext:TextBox>
                            <ext:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click">
                            </ext:Button>
                        </Items>
                    </ext:FormRow>
                </Rows>
            </ext:Form>
    <ext:Grid ID="gridProduct" runat="server" EnableRowNumber="true" EnableCheckBoxSelect="false"
        Title="" AllowPaging="True" AutoHeight="True" ShowHeader="false"  
        OnPageIndexChange="gridProduct_PageIndexChange" OnRowCommand="gridProduct_RowCommand"
        DataKeyNames="ID,FileUrl" PageSize="10">
        <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:Button ID="btnNew" Text="新增下载" Icon="Add" EnablePostBack="false" runat="server">
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <Columns>
            <ext:BoundField HeaderText="资料名称" ExpandUnusedSpace="true" Width="200px" DataField="TName" />
            <ext:BoundField HeaderText="记录时间" Width="100px" DataFormatString="{0:d}" DataField="Recorddate" />
            <ext:TemplateField HeaderText="下载" Width="150px">
                <ItemTemplate>
                    <a href="<%#GetFileUrl(Eval("FileUrl").ToString())%>" target="_blank">下载</a>
                </ItemTemplate>
            </ext:TemplateField>
            <ext:WindowField HeaderText="编辑" Width="50px" Title="编辑" Text="编辑" DataIFrameUrlFormatString="Edit.aspx?ID={0}"
                WindowID="Win_Edit" DataIFrameUrlFields="ID" />
            <ext:LinkButtonField Width="50px" Text="删除" ConfirmText="确定删除？" HeaderText="删除" ConfirmTarget="Top"
                CommandName="Delete" />
        </Columns>
    </ext:Grid>
     </Items>
    </ext:Panel>
    
    <ext:Window ID="Win_Edit" runat="server" Height="600px" IsModal="true" Hidden="true"
        Popup="false" Title="" Width="800px" EnableIFrame="true" OnClose="Win_Close"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" Target="Parent" IFrameUrl="about:blank">
    </ext:Window>
    </form>
</body>
</html>
